<%
    Users user = Trader.getUser(request.getParameter("uid"));
	wstrader.task.quality.Sample task = user.quality.sample;

	task.getRequest().setRequest(request);
	task.getResponse().setResponse(response,out);
	
	if (!user.Authenticated()) {
		response.sendRedirect("logon.jsp");
		return;
	}
	((Tasks)task.getOwner()).clearFocus();
	task.setFocus(true);	
	Trader.window_width = "90%";	
%>

<%@include file="../header.jsp"%>
<style type="text/css">
<!--
.style6 {
	font-size: 12px;
	font-weight: bold;
	font-family: Arial;
}
.style7 {
	font-family: Arial;
	font-size: 12px;
}
.style14 {font-family: Arial}
-->
</style>

<script language="javascript">
function new_sample_quality_dts(cat)
{
	var form = document.formMain;
	form.category.value = cat;
	form.action = "quality.sampleinput.card-view.jsp"
	form.submit();
}

</script>
<form action="" method="post" name="formMain" id="formMain">
  <table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="2"><img src="images/samples.jpg" width="300" height="30"></td>
    </tr>
    <tr>
      <td colspan="2"><table width="100%"  border="1" cellspacing="0" cellpadding="0">
        <tr>
          <td width="12%" valign="top"><table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
            <tr>
              <td height="28" colspan="2" align="center" bgcolor="#DDDDDD"><span class="style6">Sample Ref.</span></td>
            </tr>
            <tr>
              <td height="28" colspan="2" align="center"><select name="quality_sample_sent" size="20" class="style2" id="select2" style="width:100%; border:0" onChange="doPost()">
                <%//@include file="include/ContractRefNoList.jsp"%>
                <%
					//task.getResponse().setOption("contracts","ref_number");
					//task.getResponse().setSelected("contracts",focused_id);
				%>
              </select></td>
            </tr>
            <tr>
              <td width="86%">&nbsp;</td>
              <td width="14%">&nbsp;</td>
            </tr>
			
          </table></td>
          <td width="88%" valign="top"><table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
    <tr>
      <td height="28" colspan="2" align="right"><span class="style7">Sample Sent Date </span></td>
      <td width="1%">&nbsp;</td>
      <td width="14%"><input type="text" name="textfield"></td>
      <td width="43%" valign="middle"><img src="js/calendar.gif" width="20" height="20"></td>
      <td width="29%"><input type="hidden" name="uid"        id="uid"       value="<%=user.getuid()%>">
        <input type="hidden" name="task_id"    id = "task_id"   value="0">
        <input name="type" type="hidden" id="type" value="0">
        <input name="category" type="hidden" id="category" value="0"></td>
    </tr>
    <tr>
      <td height="28" colspan="2" align="right"><span class="style7">Sample Ref.</span></td>
      <td>&nbsp;</td>
      <td colspan="2" valign="middle"><input type="text" name="textfield2"></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="28" colspan="2" align="right"><span class="style7">Sample Sent To </span></td>
      <td>&nbsp;</td>
      <td colspan="2" valign="middle"><input type="text" name="textfield3"></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="28" colspan="2" align="right"><span class="style7">Attention To. </span></td>
      <td>&nbsp;</td>
      <td colspan="2" valign="middle"><input type="text" name="textfield4"></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="28" colspan="2" align="right"><span class="style7">AWB No. </span></td>
      <td>&nbsp;</td>
      <td colspan="2" valign="middle"><input type="text" name="textfield5"></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="28" colspan="2" align="right"><span class="style7">Remarks</span></td>
      <td>&nbsp;</td>
      <td colspan="2" valign="middle"><input type="text" name="textfield6"></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2" align="left"><strong></strong><strong><span class="style7">&nbsp;Sample Category</span></strong></td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td width="1%" align="right">&nbsp;</td>
      <td width="12%" align="left"><span class="style6">Approval</span></td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="6"><table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
        <tr>
          <td width="1%" height="29">&nbsp;</td>
          <td width="12%" align="right"><span class="style7">Contract Ref No. </span></td>
          <td width="1%">&nbsp;</td>
          <td width="23%"><input type="text" name="textfield62"></td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
        </tr>
        <tr>
          <td height="28">&nbsp;</td>
          <td align="right"><span class="style7">Buyer Ref No. </span></td>
          <td>&nbsp;</td>
          <td><input type="text" name="textfield63"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="11"><table width="100%"  border="1" cellspacing="0" cellpadding="0">
            <tr align="center" bgcolor="#DDDDDD">
              <td width="3%" class="style6">Id</td>
              <td width="11%" height="27" class="style6">Location</td>
              <td width="6%" class="style6">Lot No </td>
              <td width="7%"><span class="style6">Origin</span></td>
              <td width="5%"><span class="style6">Quality</span></td>
              <td width="23%"><span class="style6">Grade</span></td>
              <td width="3%"><span class="style6">Tons</span></td>
              <td width="4%"><span class="style6">Sample Kg </span></td>
              <td width="4%"><span class="style6">App/Rej</span></td>
              <td width="6%"><span class="style6">Controller</span></td>
              <td width="6%"><span class="style6">Date</span></td>
              <td width="15%"><span class="style6">Remarks</span></td>
              <td width="7%" class="style6">Confirm</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          </tr>
        <tr>
          <td><img src="images/new.gif" width="15" height="15" onClick="new_sample_quality_dts('1');"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><span class="style6">Pre-Ship / Delivery </span></td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
            <td colspan="6"><table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
        <tr>
          <td width="1%" height="29">&nbsp;</td>
          <td width="12%" align="right"><span class="style7">Contract Ref No. </span></td>
          <td width="1%">&nbsp;</td>
          <td width="23%"><input type="text" name="textfield62"></td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
        </tr>
        <tr>
          <td height="28">&nbsp;</td>
          <td align="right"><span class="style7">Buyer Ref No. </span></td>
          <td>&nbsp;</td>
          <td><input type="text" name="textfield63"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="11"><table width="100%"  border="1" cellspacing="0" cellpadding="0">
            <tr align="center" bgcolor="#DDDDDD">
            <tr align="center" bgcolor="#DDDDDD">
              <td width="3%" class="style6">Id</td>
              <td width="11%" height="27" class="style6">Location</td>
              <td width="6%" class="style6">Lot No </td>
              <td width="7%"><span class="style6">Origin</span></td>
              <td width="5%"><span class="style6">Quality</span></td>
              <td width="23%"><span class="style6">Grade</span></td>
              <td width="3%"><span class="style6">Tons</span></td>
              <td width="4%"><span class="style6">Sample Kg </span></td>
              <td width="4%"><span class="style6">App/Rej</span></td>
              <td width="6%"><span class="style6">Controller</span></td>
              <td width="6%"><span class="style6">Date</span></td>
              <td width="15%"><span class="style6">Remarks</span></td>
              <td width="7%" class="style6">Confirm</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          </tr>
        <tr>
          <td><img src="images/new.gif" width="15" height="15" onClick="new_sample_quality_dts(2)"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><span class="style6">Shipping</span></td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
            <td colspan="6"><table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
        <tr>
          <td width="1%" height="29">&nbsp;</td>
          <td width="12%" align="right"><span class="style7">Contract Ref No. </span></td>
          <td width="1%">&nbsp;</td>
          <td width="23%"><input type="text" name="textfield62"></td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
        </tr>
        <tr>
          <td height="28">&nbsp;</td>
          <td align="right"><span class="style7">Buyer Ref No. </span></td>
          <td>&nbsp;</td>
          <td><input type="text" name="textfield63"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="11"><table width="100%"  border="1" cellspacing="0" cellpadding="0">
            <tr align="center" bgcolor="#DDDDDD">
            <tr align="center" bgcolor="#DDDDDD">
              <td width="3%" class="style6">Id</td>
              <td width="11%" height="27" class="style6">Location</td>
              <td width="6%" class="style6">Lot No </td>
              <td width="7%"><span class="style6">Origin</span></td>
              <td width="5%"><span class="style6">Quality</span></td>
              <td width="23%"><span class="style6">Grade</span></td>
              <td width="3%"><span class="style6">Tons</span></td>
              <td width="4%"><span class="style6">Sample Kg </span></td>
              <td width="4%"><span class="style6">App/Rej</span></td>
              <td width="6%"><span class="style6">Controller</span></td>
              <td width="6%"><span class="style6">Date</span></td>
              <td width="15%"><span class="style6">Remarks</span></td>
              <td width="7%" class="style6">Confirm</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          </tr>
        <tr>
          <td><img src="images/new.gif" width="15" height="15" onClick="new_sample_quality_dts(3)"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><span class="style6">Stock</span></td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
            <td colspan="6"><table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
        <tr>
          <td width="1%" height="29">&nbsp;</td>
          <td width="12%" align="right"><span class="style7">Contract Ref No. </span></td>
          <td width="1%">&nbsp;</td>
          <td width="23%"><input type="text" name="textfield62"></td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
        </tr>
        <tr>
          <td height="28">&nbsp;</td>
          <td align="right"><span class="style7">Buyer Ref No. </span></td>
          <td>&nbsp;</td>
          <td><input type="text" name="textfield63"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="11"><table width="100%"  border="1" cellspacing="0" cellpadding="0">
            <tr align="center" bgcolor="#DDDDDD">
            <tr align="center" bgcolor="#DDDDDD">
              <td width="3%" class="style6">Id</td>
              <td width="11%" height="27" class="style6">Location</td>
              <td width="6%" class="style6">Lot No </td>
              <td width="7%"><span class="style6">Origin</span></td>
              <td width="5%"><span class="style6">Quality</span></td>
              <td width="23%"><span class="style6">Grade</span></td>
              <td width="3%"><span class="style6">Tons</span></td>
              <td width="4%"><span class="style6">Sample Kg </span></td>
              <td width="4%"><span class="style6">App/Rej</span></td>
              <td width="6%"><span class="style6">Controller</span></td>
              <td width="6%"><span class="style6">Date</span></td>
              <td width="15%"><span class="style6">Remarks</span></td>
              <td width="7%" class="style6">Confirm</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          </tr>
        <tr>
          <td><img src="images/new.gif" width="15" height="15" onClick="new_sample_quality_dts(4)"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="4"><span class="style6">Reference / Offer / Type</span></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
            <td colspan="6"><table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
        <tr>
          <td width="1%" height="29">&nbsp;</td>
          <td width="12%" align="right"><span class="style7">Contract Ref No. </span></td>
          <td width="1%">&nbsp;</td>
          <td width="23%"><input type="text" name="textfield62"></td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
          <td width="9%">&nbsp;</td>
        </tr>
        <tr>
          <td height="28">&nbsp;</td>
          <td align="right"><span class="style7">Buyer Ref No. </span></td>
          <td>&nbsp;</td>
          <td><input type="text" name="textfield63"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="11"><table width="100%"  border="1" cellspacing="0" cellpadding="0">
            <tr align="center" bgcolor="#DDDDDD">
            <tr align="center" bgcolor="#DDDDDD">
              <td width="3%" class="style6">Id</td>
              <td width="11%" height="27" class="style6">Location</td>
              <td width="6%" class="style6">Lot No </td>
              <td width="7%"><span class="style6">Origin</span></td>
              <td width="5%"><span class="style6">Quality</span></td>
              <td width="23%"><span class="style6">Grade</span></td>
              <td width="3%"><span class="style6">Tons</span></td>
              <td width="4%"><span class="style6">Sample Kg </span></td>
              <td width="4%"><span class="style6">App/Rej</span></td>
              <td width="6%"><span class="style6">Controller</span></td>
              <td width="6%"><span class="style6">Date</span></td>
              <td width="15%"><span class="style6">Remarks</span></td>
              <td width="7%" class="style6">Confirm</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table></td>
          </tr>
        <tr>
          <td><img src="images/new.gif" width="15" height="15" onClick="new_sample_quality_dts(5)"></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table></td>
	</tr>
    <tr>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>

          </table></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td width="12%">&nbsp;</td>
      <td width="88%">&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
<%@include file="../footer.jsp"%>
